package com.zbl.zblproject.erp.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zbl.zblproject.core.entity.AdminUser;
import com.zbl.zblproject.erp.entity.ErpAllotOrder;
import com.zbl.zblproject.erp.entity.ErpAllotOrderItem;

import java.util.List;

/**
 * @author youlanqiang
 * @version 1.0
 * @date 2018/10/24
 */
public interface ErpAllotService {

    /**
     * 状态回滚
     * @param id
     * @return
     */
    boolean rollback(int id);

    IPage<ErpAllotOrder> page(String search, int current, int size);

    /**
     * 创建一个调拨单
     * @param orderSn 订单号
     * @param status  状态
     * @param user    用户
     * @param orderItems 盘点商品
     * @return
     */
    ErpAllotOrder createOrderByStatus(String orderSn, int status, AdminUser user, List<ErpAllotOrderItem> orderItems);

    /**
     * 获取盘点单下的商品
     * @param orderSn 订单号
     * @return
     */
    List<ErpAllotOrderItem> orderItemByOrderSn(String  orderSn);

    /**
     * 更新盘点单状态
     * @param orderSn 订单号
     * @return
     */
    boolean updateOrder(String orderSn);

    /**
     * 删除订单
     * @param id
     * @return
     */
    boolean deleteOrderById(int id);


}
